<template>
  <div class="main">
    <el-form class="header">
      <!-- 返回按钮 -->
      <el-form-item>
        <el-button type="primary" icon="el-icon-arrow-left" @click="back">
          返回
        </el-button>
      </el-form-item>
      <el-form-item label="计划书编号:" class="item_input">
        <el-input
          v-model="search.flbh"
          placeholder="请输入计划书编号"
          clearable
        ></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="async_fl"> 附录同步 </el-button>
      </el-form-item>
    </el-form>

    <div class="container">
      <div class="title">基本信息</div>
      <div class="info">
        <div class="cell">
          <div class="cell_title">车型编号:</div>
          <div class="cell_content">Y000001</div>
        </div>
        <div class="cell">
          <div class="cell_title">车辆型号/名称:</div>
          <div class="cell_content">SVW7160/轿车</div>
        </div>
        <div class="cell">
          <div class="cell_title">品牌:</div>
          <div class="cell_content">MAGOTAN</div>
        </div>
        <div class="cell">
          <div class="cell_title">商标:</div>
          <div class="cell_content">大众</div>
        </div>
        <div class="cell">
          <div class="cell_title">车型编号:</div>
          <div class="cell_content">Y000001</div>
        </div>
        <div class="cell">
          <div class="cell_title">车辆型号/名称:</div>
          <div class="cell_content">SVW7160/轿车</div>
        </div>
        <div class="cell">
          <div class="cell_title">品牌:</div>
          <div class="cell_content">MAGOTAN</div>
        </div>
        <div class="cell">
          <div class="cell_title">商标:</div>
          <div class="cell_content">大众</div>
        </div>
        <div class="cell">
          <div class="cell_title">车型编号:</div>
          <div class="cell_content">Y000001</div>
        </div>
        <div class="cell">
          <div class="cell_title">车辆型号/名称:</div>
          <div class="cell_content">SVW7160/轿车</div>
        </div>
        <div class="cell">
          <div class="cell_title">品牌:</div>
          <div class="cell_content">MAGOTAN</div>
        </div>
        <div class="cell">
          <div class="cell_title">商标:</div>
          <div class="cell_content">大众</div>
        </div>
        <div class="cell">
          <div class="cell_title">车型编号:</div>
          <div class="cell_content">Y000001</div>
        </div>
        <div class="cell">
          <div class="cell_title">车辆型号/名称:</div>
          <div class="cell_content">SVW7160/轿车</div>
        </div>
        <div class="cell">
          <div class="cell_title">品牌:</div>
          <div class="cell_content">MAGOTAN</div>
        </div>
        <div class="cell">
          <div class="cell_title">商标:</div>
          <div class="cell_content">大众</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      search: {
        flbh: "",
      },
      tableData: [],
      selection: [],
    };
  },
  methods: {
    back() {
      this.$router.go(-1);
    },
    async_fl() {
      this.$confirm("确定要同步附录吗？", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        this.$http
          .post("/api/cxgl/cxqd/async_fl", {
            flbh: this.search.flbh,
          })
          .then(({ data }) => {
            if (data.status_code === 200) {
              this.$message({
                type: "success",
                message: "同步成功",
              });
            } else {
              this.$message({
                type: "error",
                message: data.message,
              });
            }
          });
      });
    },
  },
};
</script>

<style lang='scss' scoped>
.main {
  padding: 20px;
  .header {
    display: flex;
    .el-form-item {
      margin-right: 20px;
    }
    .item_input {
      display: flex;
      width: 300px;
    }
  }
}
</style>